<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<h:head>
<script language="JavaScript">
    function doPrint() { 
    	var now = new Date();
    	var strDateTime = [[now.getDate(), now.getMonth() + 1, now.getFullYear()].join("/"), [now.getHours(), now.getMinutes()].join(":"), now.getHours() >= 12 ? "PM" : "AM"].join(" ");
    	
    	bdhtml=window.document.body.innerHTML; 
    	sprnstr=""; 
    	eprnstr="Print at " + strDateTime +  "<br />** END **"; 
		prnhtml = "*** Booking Receipt *** " + "<br />" + 
					"Booking Date and Time : " + document.getElementById("datedesc").innerHTML + "<br />" +
					"Book By : " + document.getElementById("username").innerHTML + "<br />" +
					"Vanus : " + document.getElementById("venusdesc").innerHTML  + "<br />" +
					"Vanus Price : " + document.getElementById("venusPrice").innerHTML  + "<br />" + "<br />" +
					
					"Facility #01 : " + document.getElementById("facility01").innerHTML  + "<br />" +
					"Fac#01 Qty : " + document.getElementById("facility01Qty").innerHTML  + "<br />" +
					"Fac#01 Price : " + document.getElementById("facility01Price").innerHTML  + "<br />" +
					
					"Facility #02 : " + document.getElementById("facility02").innerHTML  + "<br />" +
					"Fac#02 Qty : " + document.getElementById("facility02Qty").innerHTML  + "<br />" +
					"Fac#02 Price : " + document.getElementById("facility02Price").innerHTML  + "<br />" +
					
					"Facility #03 : " + document.getElementById("facility03").innerHTML  + "<br />" +
					"Fac#03 Qty : " + document.getElementById("facility03Qty").innerHTML  + "<br />" +
					"Fac#03 Price : " + document.getElementById("facility03Price").innerHTML  + "<br />" +
					
					"Facility #04 : " + document.getElementById("facility04").innerHTML  + "<br />" +
					"Fac#04 Qty : " + document.getElementById("facility04Qty").innerHTML  + "<br />" +
					"Fac#04 Price : " + document.getElementById("facility04Price").innerHTML  + "<br />" +
					
					"Facility #05 : " + document.getElementById("facility05").innerHTML  + "<br />" +
					"Fac#05 Qty : " + document.getElementById("facility05Qty").innerHTML  + "<br />" +
					"Fac#05 Price : " + document.getElementById("facility05Price").innerHTML  + "<br />" + "<br />" +
					
					"Total Price : " + document.getElementById("totalPrice").innerHTML  + "<br />" +
					 "<br />" + "<br />" + "<br />" + eprnstr;
		
    	window.document.body.innerHTML=prnhtml; 
    	window.print();
    	}
</script> 
</h:head> 
<body> 
<i>*** Booking Receipt *** </i>

 	<h:panelGrid columns="2" border="2" color="black">
		<h:outputText value="Booking Date and Time : "  />
		<h:outputText id= "datedesc" value="#{bookingDetail.BookDateTimeDesc()}"  style="color: #5459c9;" />
		<h:outputText value="Book by : "  />
		<h:outputText id= "username" value="#{bookingDetail.bookingBy}"  style="color: #5459c9;" />
		<h:outputText value="Vanus : "  />
		<h:outputText id= "venusdesc" value="#{bookingDetail.venusDesc}"  style="color: #5459c9;" />
		<h:outputText value="Vanus Price : "  />
		<h:outputText id= "venusPrice" value="#{bookingDetail.venusPrice}"  style="color: #5459c9;" />
		
		<h:outputText value="Facility #01 : "  />
		<h:outputText id= "facility01" value="#{bookingDetail.DispFacilityDesc(1)}"  style="color: #5459c9;" />
		<h:outputText value="Fac#01 Qty : "  />
		<h:outputText id= "facility01Qty" value="#{bookingDetail.bookFacility01Qty}"  style="color: #5459c9;" />
		<h:outputText value="Fac#01 Price : "  />
		<h:outputText id= "facility01Price" value="#{bookingDetail.bookFacility01Price}"  style="color: #5459c9;" />
		
		<h:outputText value="Facility #02 : "  />
		<h:outputText id= "facility02" value="#{bookingDetail.DispFacilityDesc(2)}"  style="color: #5459c9;" />
		<h:outputText value="Fac#02 Qty : "  />
		<h:outputText id= "facility02Qty" value="#{bookingDetail.bookFacility02Qty}"  style="color: #5459c9;" />
		<h:outputText value="Fac#02 Price : "  />
		<h:outputText id= "facility02Price" value="#{bookingDetail.bookFacility02Price}"  style="color: #5459c9;" />
		
		<h:outputText value="Facility #03 : "  />
		<h:outputText id= "facility03" value="#{bookingDetail.DispFacilityDesc(3)}"  style="color: #5459c9;" />
		<h:outputText value="Fac#03 Qty : "  />
		<h:outputText id= "facility03Qty" value="#{bookingDetail.bookFacility03Qty}"  style="color: #5459c9;" />
		<h:outputText value="Fac#03 Price : "  />
		<h:outputText id= "facility03Price" value="#{bookingDetail.bookFacility03Price}"  style="color: #5459c9;" />
		
		<h:outputText value="Facility #04 : "  />
		<h:outputText id= "facility04" value="#{bookingDetail.DispFacilityDesc(4)}"  style="color: #5459c9;" />
		<h:outputText value="Fac#04 Qty : "  />
		<h:outputText id= "facility04Qty" value="#{bookingDetail.bookFacility04Qty}"  style="color: #5459c9;" />
		<h:outputText value="Fac#04 Price : "  />
		<h:outputText id= "facility04Price" value="#{bookingDetail.bookFacility04Price}"  style="color: #5459c9;" />
		
		<h:outputText value="Facility #05 : "  />
		<h:outputText id= "facility05" value="#{bookingDetail.DispFacilityDesc(5)}"  style="color: #5459c9;" />
		<h:outputText value="Fac#05 Qty : "  />
		<h:outputText id= "facility05Qty" value="#{bookingDetail.bookFacility05Qty}"  style="color: #5459c9;" />
		<h:outputText value="Fac#05 Price : "  />
		<h:outputText id= "facility05Price" value="#{bookingDetail.bookFacility05Price}"  style="color: #5459c9;" />
		
		<h:outputText value="Total Price : "  />
		<h:outputText id= "totalPrice" value="#{bookingDetail.BookingTotalPrice()}"  style="color: #5459c9;" />
		
		
	</h:panelGrid>
 	<br />
 	
 	<h:form>
		<h:commandButton value="Print" onclick="doPrint();" style="font-size:26px;" action="#{bookingDetail.SetUserNull()}" >
		</h:commandButton> 
 	</h:form>

</body> 
</html>
